<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="css/common.min.css"/>
		<link rel="stylesheet" type="text/css" href="css/favoritesty.css">
		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/utils.js" type="text/javascript" charset="utf-8"></script>
		<title>收藏夹</title>
	</head>
	<body>
		<div class="favoWeb">
			<header class="backHeader">
				<div class="cephalo">
					<span class="img_jiantou"><img src="img/Information_consultation/left.png"/></span>
					<span class="fav_name">收藏夹</span>
					<span class="guanl">管理</span>
				</div>
			</header>
			<div class="clear"></div>
			<section>
				<div class="middle">
					<form id="myForm" action="" method="get">
					<ul class="merchandise">
						<li class="products">
							<div class="img">
								<img src="img/favoriteimg/pho_1.png"/>
							</div>
							<div class="pro_particulars">
								<p class="pro_name">im五斗柜</p>
								<p class="pro_money">￥1212</p>
								<p class="selCircle"></p>
							</div>
							<input name="mySel" type="checkbox" hidden value="1" />
						</li>
						<li class="products">
							<div class="img">
							<img src="img/favoriteimg/pho_2.png"/>
							</div>
							<div class="pro_particulars">
								<p class="pro_name">im五斗柜</p>
								<p class="pro_money">￥1212</p>
								<p class="selCircle"></p>
							</div>
							<input type="checkbox" hidden />
						</li>
						<li class="products">
							<div class="img">
							<img src="img/favoriteimg/pho_2.png"/>
							</div>
							<div class="pro_particulars">
								<p class="pro_name">im五斗柜</p>
								<p class="pro_money">￥1212</p>
								<p class="selCircle"></p>
							</div>
							<input type="checkbox" hidden />
						</li>
						<li class="products">
							<div class="img">
							<img src="img/favoriteimg/pho_2.png"/>
							</div>
							<div class="pro_particulars">
								<p class="pro_name">im五斗柜</p>
								<p class="pro_money">￥1212</p>
								<p class="selCircle"></p>
							</div>
							<input type="checkbox" hidden />
						</li>
						<!--<li class="products">
							<div class="img">
							<img src="img/favoriteimg/pho_2.png"/>
							</div>
							<div class="pro_particulars">
								<p class="pro_name">im五斗柜</p>
								<p class="pro_money">￥1212</p>
								<p class="selCircle"></p>
							</div>
							<input type="checkbox" hidden />
						</li>-->
					</ul>
					</form>
				</div>
				<div class="apply">
					<div class="selBtn">
						<div class="yuan">
							<div></div>
						</div>
						<span>全选</span>
					</div>
					<div class="del_bottom seeMore_ mySub_">
						<p>删&nbsp;&nbsp;&nbsp;&nbsp;除</p>
					</div>
				</div>
			</section>
			<div class="clear"></div>
			<footer>
				<ul>
					<li class="li_one"><div class="img_one"><img src="img/favoriteimg/footer_01.jpg" /></div></li>
					<li class="li_two"><div class="img_two"><img src="img/favoriteimg/footer_02.jpg" /></div></li>
					<li class="li_three"><div class="img_three"><img src="img/favoriteimg/footer_03.jpg" /></div></li>
					<li class="li_four"><div class="img_four"><img src="img/favoriteimg/footer_04.jpg" /></div></li>
				</ul>
			</footer>
		</div>

		<script src="js/touchBtn.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/favorite.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			//图片选中
			$(".merchandise li").on("click",function(){
				var sel = $(this).data("selected");
				if(!sel){
					$(this).find(".selCircle").addClass("sel_bg");
					$(this).find("input").prop("checked",true)
					$(this).data("selected",true)
				}else{
					$(this).data("selected",false);
					$(this).find(".selCircle").removeClass("sel_bg");
					$(this).find("input").prop("checked",false)
				}
				
			})
			//全选
			$(".apply .selBtn").on("click",function(){
				$(this).find(".yuan div").fadeToggle(100);
				var sel = $(this).data("selected");
				if(!sel){
					$(".merchandise li").find(".selCircle").addClass("sel_bg");
					$(".merchandise li").find("input").prop("checked",true);
					$(".merchandise li").data("selected",true);
					$(this).data("selected",true);
				}else{
					$(".merchandise li").find(".selCircle").removeClass("sel_bg");
					$(".merchandise li").find("input").prop("checked",false);
					$(".merchandise li").data("selected",false);
					$(this).data("selected",false);
				}
				
				
			})
			//提交
			$(".mySub_").on("click",function(){
				$("#myForm").submit();
				$(".merchandise li").each(function(){
					if($(this).data("selected")){
						$(this).fadeOut();
					}
				})
				
			})
			//东环路番禺交警一中队  84878126 84896238
		</script>
	</body>
</html>
